package utils;

import java.sql.Connection;
import java.sql.DriverManager;

/**
 * Created by 冷 on 2017/9/12.
 */
public class JDBCUtils {
    public static Connection getConnection(){
        try {
            Class.forName("com.mysql.jdbc.Driver");
            Connection conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/jdbc","root","root");
            return conn;
        } catch (Exception e) {
            e.printStackTrace();
        }
        return null;
    }


}
